//
//  PathView.swift
//  EasySwift
//
//  Created by 王隆帅 on 2017/6/10.
//  Copyright © 2017年 王隆帅. All rights reserved.
//

import UIKit

class PathView: UIView {

    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
         Drawing code
    }
    */
    
    override func draw(_ rect: CGRect) {
        
        let path = UIBezierPath();
        
        path.addArc(withCenter: self.center, radius: 100.0, startAngle: 0, endAngle: 180.0, clockwise: true);
        path.lineWidth = 5.0;
        
        UIColor.red.setFill();
        UIColor.blue.setStroke();
        
        path.fill();
        
        path.stroke();
    }

}
